package emulator.shell.GUI.windows;

import java.awt.event.WindowEvent;

import emulator.GUI.PersistentFrame;

@SuppressWarnings("serial")
public class ManagedWindow extends PersistentFrame {

	private int id;
	private WindowManager manager;
	
	ManagedWindow(WindowManager manager, String name) {
		super(name);
		this.manager = manager;
	}

	/* (non-Javadoc)
	 * @see emulator.GUI.PersistentFrame#windowClosing(java.awt.event.WindowEvent)
	 */
	@Override
	public void windowClosing(WindowEvent arg0) {
		manager.unregisterWindow(this);
		super.windowClosing(arg0);
	}

	public int getID() {
		return id;
	}

	public void setID(int id) {
		this.id = id;
	}
	
	

}
